package seven.test_7_10;

import java.util.Scanner;

public class TestMain2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] arr = new int[n][n];
        int count = n;
        for (int i = 0; i < n; i++) {
            count--;
            for (int j = 0; j < n - count;j++) {
                if(j == 0 || j == n - count + 1) {
                    arr[i][j] = 1;
                    System.out.print("    " + arr[i][j]);
                } else {
                    arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
                    int tmp = 0;
                    int t = arr[i][j];
                    while (t/10 > 0) {
                        tmp++;
                        t /= 10;
                    }
                    for (int k = tmp; k < 4; k++) {
                        System.out.print(" ");
                    }
                    System.out.print(arr[i][j]);
                }
            }
            System.out.println();
        }
    }
}
